<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>idc登录</title>
    <link rel="stylesheet" href="./layui/css/layui.css">
    <link rel="stylesheet" href="./css/login.css">
</head>
<body>
    <!-- 外层容器 -->
    <div class="layui-container login">
        <div class="login-main">
            <!-- 栅格布局 -->
            <div class="layui-row">
                <!-- IDC左边标题图片 -->
                <div class="login-logo layui-col-md6 layui-col-xs12">
                    <h1>I D C 企 业 加 盟 平 台</h1>
                    <img src="./images/logo-img.png">
                </div>
                <!-- 右边登录表单 -->
                <div class="login-form layui-col-md6 layui-col-xs12">
                    <div class="fm">
                        <div class="fm-main">
                            <form action="" class="layui-form">
                                <h1>登录</h1>
                                <p>用户名</p>
                                <input type="text" id="uname" onfocus="showNameMsg()" onblur="checkName()">
                                <p class="msg" id="msg1"></p>
                                <p class="mt">密码</p>
                                <input type="text" id="upwd" onfocus="showPwdMsg()" onblur="checkPwd()">
                                <p class="msg" id="msg2"></p>
                                <div class="reg-tt">
                                    <span><a href="">立即注册</a></span>
                                    <span><a href="">忘记密码？</a></span>
                                </div>
                                <button class="login-btn">登 录 </button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        function showNameMsg(){
		msg1.innerHTML="请输入您的用户名";
        console.log(111)
       
	}
    function checkName(){
		if(uname.value==""){
			msg1.innerHTML="用户名不能为空";
		}else if(uname.value.length<6 ||uname.value.length>12){
			msg1.innerHTML="用户名格式正确";
		}else{
			msg1.innerHTML="用户名格式错误";
		}
	}
	function showPwdMsg(){
		msg2.innerHTML="请输入您的密码";
	}
	function checkPwd(){
		if(upwd.value==""){
			msg2.innerHTML="密码不能为空";
		}else if(upwd.value.length=6){
			msg2.innerHTML="密码格式正确";
		}else{
			msg2.innerHTML="密码格式错误";
		}
	}
    </script>




<script src="./layui/layui.js"></script>
</body>
</html>